package com.sunyard.client2.ui;

import javax.swing.JPanel;
import javax.swing.JButton;

import com.sunyard.client.SunEcmClientApi;
import com.sunyard.client2.ConnectionFactory;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class AllModel extends JPanel {

	/**
	 * Create the panel.
	 */
	public AllModel() {
		setLayout(null);
		
		JButton btnNewButton = new JButton("查询");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {

				try {
					SunEcmClientApi clientApi = ConnectionFactory.getConnection();
					String resultMsg = clientApi.getAllModelMsg_Client();
					ResultMessageBox.getInstance().showMessage(resultMsg);
				} catch (Exception e1) {
					ResultMessageBox.getInstance().showMessage(e1.getMessage());
				}
			
			}
		});
		btnNewButton.setBounds(104, 173, 93, 23);
		add(btnNewButton);

	}

}
